package com.icode.service.user;

import com.icode.core.dto.user.LoginDTO;
import com.icode.core.dto.user.PasswordHandelDTO;
import com.icode.core.dto.user.UserDTO;
import com.icode.core.dto.user.UsersInfoDTO;
import com.icode.core.model.user.*;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: sunk
 * Date: 14-12-26
 * Time: 上午11:45
 * To change this template use File | Settings | File Templates.
 */
public interface UserService {

    byte[] showImageByGuid(String imageGuid);

    void saveOrUpdate(UserDTO registerDTO);

    boolean login(LoginDTO loginDTO);

    Customer findByPhoneNum(String phoneNum);

    void saveOrUpdateUsersInfo(UsersInfoDTO usersInfoDTO, UserInfo userInfo);

    UsersInfoDTO initUserInfo(UserInfo userInfo);

    List<UserInfo> findUsersInfoByUsername(String username);

    List<Province> findProvince();

    List<City> findCityById(String provinceId);

    List<District> findDistrictById(String cityId);

    String verify(HttpSession session);

    UsersInfoDTO initUserInfoDTO(User currentUser);

    UserInfo findUserInfoByUsername(String username);

    User findUserByUserName(String username);

    UserInfo findUserInfoByUser(User user);

    UserInfo findUserInfoByUsername(String username, String userInfoGuid);

    UsersInfoDTO getUserInfoDTO(String userInfoGuid);

    void updataPassWord(PasswordHandelDTO passwordHandelDTO);

    List<UsersInfoDTO> findAllUserInfo(String currentPage);

    Object findTotalPage(Class clazz);

    List<UsersInfoDTO> findUserInfoByPhoneNumAndRealName(String phoneNum, String realName);

    void changeUserStatus(String phoneNum, String activate);
}
